<!--
  Generated template for the TaskListPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>{{title}}</ion-title>
  </ion-navbar>

</ion-header>


<ion-content padding>
  <div class="queryCondition">
    <ion-item>
      <ion-label>业务类型</ion-label>
      <ion-select (ionChange)="select()" okText="确认" cancelText="取消" [selectOptions]="selectOptions" [(ngModel)]="businessType">
        <ion-option *ngFor="let item of businessTypes" value="{{item.key}}">
          {{item.val}}
        </ion-option>
      </ion-select>
    </ion-item>
  </div>
  <div class="taskList">
    <div class="listDiv">
      <div *ngIf="tasks.length > 0">
        <ion-card *ngFor="let item of tasks" (click)="push(item)">
          <div *ngIf="item.businessType == 'IntraCityDistribution'">
            <ion-card-title>
              {{item.businessTitle}}--<span style="color:red;" class="amount">{{item.amount}}元</span><span></span>
            </ion-card-title>
            <ion-card-content>
              <h3>距你：{{item.toMeDistance}}千米</h3>
              <h3>配送距离:{{item.distance}}千米</h3>
              <h3>起点：{{item.sourceAddressInfo}}</h3>
              <h3>终点：{{item.destinationAddressInfo}}</h3>
            </ion-card-content>
          </div>
        </ion-card>
      </div>
      <div *ngIf="tasks.length == 0">
        <div class="taskHelper">
          <span>此时你所在的附近没有订单!</span>
        </div>
      </div>
    </div>
  </div>

</ion-content>